#pragma once
#include <iostream>
#include <sstream>
using namespace std;

class Result
{

private:
	int TestID;
	int points;

public:

	Result()
	{
		TestID = -1;
		points = 0;
	}

	Result(int TestID, int points)
	{
		this->TestID = TestID;
		this->points = points;
	}


	friend ostream& operator<<(ostream &o, const Result &Result)
	{
		o << "(";
		o << Result.TestID << ",";
		o << Result.points;
		o << ")";
		return o;
	}

	friend istream& operator>>(istream &i, Result &Result)
	{
		string s;
		getline(i, s, '(');

		getline(i, s, ',');
		istringstream iss(s);
		iss >> Result.TestID;

		getline(i, s, ')');
		istringstream iss2(s);
		iss2 >> Result.points;

		return i;
	}



	int GetPoints() { return this->points; }
	void  SetPoints(int points) { this->points = points; }


	int GetTestID() { return this->TestID; }
	void SetTestID(int testid) { this->TestID = testid; }

	~Result()
	{
	}
};
